//
//  e7log.cpp
//  e7engine
//
//  Created by cc on 12-6-6.
//  Copyright (c) 2012年 cc. All rights reserved.
//

#include "e7log.h"

namespace e7engine {

    void Log(eLogLevel lv, const char* format, ...)
    {
        va_list ap ;
        va_start(ap, format) ;
        CE7Log::Instance()._Log(lv, format, ap) ;
        va_end(ap) ;
    }

    void CE7Log::_Log(eLogLevel lv, const char* format, va_list ap)
    {
        switch (lv) {
            case LOG_DETAIL:    { _Detail(format, ap) ; } break ;
            case LOG_DEBUG:     { _Debug(format, ap) ; } break ;
            case LOG_WARNING:   { _Warning(format, ap) ; } break ;
            case LOG_ERROR:     { _Error(format, ap) ; } break ;
            default: break;
        }
    }

// private.
    CE7Log::CE7Log()
    {
    }
    CE7Log::~CE7Log()
    {
    }
    void CE7Log::_Detail(const char* format, va_list ap)
    {
        ::printf(format, ap) ;
    }
    void CE7Log::_Debug(const char* format, va_list ap)
    {
        ::printf(format, ap) ;
    }
    void CE7Log::_Warning(const char* format, va_list ap)
    {
        ::printf(format, ap) ;
    }
    void CE7Log::_Error(const char* format, va_list ap)
    {
        ::printf(format, ap) ;
    }
}














